package com.ricchieri.dao;

import java.util.List;

import org.hibernate.Criteria;

import com.ricchieri.dao.interf.IUserEmailDao;
import com.ricchieri.filter.BasicFilter;
import com.ricchieri.model.UserEmail;

public class UserEmailDao extends GenericDao implements IUserEmailDao {

	private static final long serialVersionUID = 7157417274783292246L;

	@Override
	@SuppressWarnings("unchecked")
	public List<UserEmail> getAllUserEmail(BasicFilter filter) {
		Criteria criteria = criteriaAllUserEmail(filter);
		
		return criteria.list();
	}
	
	private Criteria criteriaAllUserEmail(BasicFilter filter) {
		return super.criteriaAllBasic(filter, UserEmail.class);
	}	

	@Override
	protected String getTableName() {
		return "userEmail";
	}
}
